/*
 * @Description: 因子库列表
 * @Author: chenju
 * @Date: 2022-01-19 10:47:42
 * @LastEditors: chenju
 * @LastEditTime: 2022-01-25 16:38:51
 */

import { get } from '@/utils/http'
import type { BasicPagingListParams, BasicPagingListResult } from '@/apis/basicModel'
import type { GetFactorListParams, GetFactorListResult } from './model/factorListModel'
import config from '@/config'

enum Api {
  // 因子库列表分页查询
  GET_FACTOR_LIST = '/footprint/factor/getPageFactor',
  // 因子库文件导入
  IMPORT_FACTOR = '/footprint/factor/factorImport'
}

// 因子库列表分页查询
export const getFactorList = (
  params: GetFactorListParams & BasicPagingListParams
): Promise<BasicPagingListResult<GetFactorListResult>> => get(Api.GET_FACTOR_LIST, params)

// 因子库导入url
// export const importFactorUrl = (params: any): Promise<void> => post(Api.IMPORT_FACTOR, { params });
export const importFactorUrl = config.BASE_URL + Api.IMPORT_FACTOR
